package cn.com.cym.gamezao.repository.xmu.recruit;

import cn.com.cym.gamezao.base.BaseRepository;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.xmu.recruit.WorkExperience;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.stereotype.Repository;

import java.util.List;

@RedisHash
@Repository
public interface WorkExperienceRepository extends BaseRepository<WorkExperience,Long> {
    List<WorkExperience> findAllByUser(User user);

    @Query("from WorkExperience where user.id=:userId")
    List<WorkExperience> findAllByUserId(Long userId);
}
